<script>
	export default {
		onLaunch: function() {
			uni.login({
				success: (res) => {
					uni.request({
					  url: 'https://boss.smart-ideas.com.cn/ticketApi/wxAuth/miniAuthorize',
					  data: {
					    enterpriseCode: 'TgsEpcQdl',
					    ticketGroupNum: 'TGN20231225095940727',
					    code: res.code
					  },
					  method: 'GET',
					  success: function (res) {
					    if(res.data.success){
					      let openId = res.data.data;
					      uni.setStorageSync('openId', openId);
						  uni.setStorageSync('enterpriseCode', 'TgsEpcQdl');
					    }else{
					      wx.showModal({
					        content: res.data.message
					      })
					    }
					  },
					})
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	uni-page-head{
		display: none;
	}
	.tabBar{
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background-color: #fff;
		border-top: 1px solid #eee;
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}
	.tabItem{
		width: 50%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		padding: 20rpx 0;
		font-size: 12px;
		color: #7A7E83;
	}
	.tabItem .active{
		color: rgb(7,182,255);
	}
	.tabItem image{
		height: 50rpx;
	}
</style>
